errors = []; 
window.onerror = function(message, source, lineno, colno, error){
    errors.push({
        "message": message, 
        "source": source, 
        "lineno": lineno, 
        "colno": colno, 
        "error": error
    }); 
    return true
}